package game.module.battleReport.logic;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import game.HallServer;
import game.module.battleReport.bean.BattleReport;
import game.module.battleReport.dao.BattleReportCache;
import game.module.battleReport.dao.BattleReportDBDao;


public class BattleReportHelper {
	private static Logger logger = LoggerFactory.getLogger(BattleReportHelper.class);


	static class SingletonHolder {
		static BattleReportHelper instance = new BattleReportHelper();
	}

	public static BattleReportHelper getInstance() {
		return SingletonHolder.instance;
	}
	
	public void asyncGetBattleReportFromDb(final long battleid,final int player) {
		HallServer.executorService.execute(new Runnable() {
			
			@Override
			public void run() {
				// TODO Auto-generated method stub
				BattleReport battlereport =BattleReportDBDao.getInstance().getRealbattle(battleid);
				//BattleReportCache.getInstance().addBattleReportInCache(battlereport, player);
			}
		});
	}
}
